package org.hive.testserver.domain.model;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.StringUtils;

public class ProjectConfiguration {

	private Map<String,String> properties = new HashMap<String,String>();
	
	public ProjectConfiguration() {
		super();
	}

	public Map<String,String> propertiesCopy() {
		return new HashMap<String,String>(properties);
	}

	public void setProperty(String key, String value) {
		properties.put(key, StringUtils.defaultString(value));
	}

	public String getPropertyOrNull(String key) {
		return properties.get(key);
	}

	public void updateProperties(Map<String,String> newValues) {
		properties.clear();
		properties.putAll(newValues);
	}
		
}
